<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
		<!-- 引入vue -->
		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
		
		
	</head>
	<body>
		<!-- View -->
		<div id="app">
			{{msg}}<br />
            <button @click="add()">{{count}}</button>
		</div>
		
		<script type="text/javascript">
			
			// View-Model
			const vm = Vue.createApp(
				{
					
					data(){
						return {
							msg:"Hello world,Vue!",
                            count: 0
						}
					},
                     methods:{
                        add(){

                            this.count++;
                        }
                     }
				}
			)
			vm.mount("#app")
		</script>
		
	</body>
</html>

